<?php

class CommentController extends CController
{
    public function actions()
    {
        return array(
            'ajaxList'=>'application.controllers.comment.AjaxListAction',
            'create'=>'application.controllers.comment.CreateAction',
            'delete'=>'application.controllers.comment.DeleteAction',
            'vote'=>'application.controllers.comment.VoteAction',
        );
    }

    public function filters()
    {
        return array(
            'accessControl',
        );
    }

    public function accessRules()
    {
        return array(
            array('allow',
                'actions'=>array('ajaxList'),
                'users'=>array('*'),
            ),
            array('allow',
                'actions'=>array('create','delete','vote'),
                'users'=>array('@'),
            ),
            array('deny',
                'users'=>array('?'),
            ),
        );
    }
}
